<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/templates/internal.xhtml">
	<ui:define name="center">
		<script type="text/javascript">
			$( document ).ready(function() {
				wlayout.layout.hide('south');
				wlayout.layout.open('west');
				$(".ytp-button-watch-later").css('visible','hidden');
				
			});			
		</script>
		<p:outputPanel id="content" layout="block" style="height:100%;width:100%">
			<ui:include src="/equipment/equipmentForm.xhtml"/> 
		</p:outputPanel>
	</ui:define>
	<ui:define name="menu">
		<h:form id="listEquipmentForm" prependId="false">
			<p:dataTable id="equipmentsTable" value="#{equipmentBean.equipments}" var="equipment" paginator="true"  paginatorAlwaysVisible="false"  paginatorPosition="bottom" rows="15" emptyMessage="#{msgs.NoResults}">
				<p:columnGroup type="header">  
					<p:row>
						<p:column colspan="4">
							<f:facet name="header">
								<h:outputText value="#{msgs.Equipments}" />
							</f:facet>
						</p:column>
						<p:column colspan="1" styleClass="ui-table-button-row">
							<f:facet name="header">
								<p:commandButton title="#{msgs.Filter}" icon="ui-icon-search" onclick="wfindEquipment.show()" styleClass="ui-table-button"/>
							</f:facet>
						</p:column>
					</p:row>
					<p:row>
						<p:column colspan="1" styleClass="ui-table-button-row">
							<f:facet name="header">
								<p:commandButton title="#{msgs.Add}"	action="#{equipmentBean.toAddEquipment}" update=":content"	 icon="ui-icon-plus" styleClass="ui-table-button"/>
							</f:facet>
						</p:column>
						<p:column	colspan="4">
							<f:facet name="header">
								<h:outputText value="#{msgs.Name}"/>
							</f:facet>
						</p:column>
					</p:row>	
				</p:columnGroup>
				<p:column colspan="3" headerText="#{msgs.Name}" >
					<h:outputText value="#{equipment.name} " />
				</p:column>
				<p:column colspan="1" styleClass="ui-widget-header ui-table-button-row"  >
					<p:commandButton title="#{msgs.View}" action="#{equipmentBean.toViewEquipment}"  icon="ui-icon-search"  styleClass="ui-table-button" update=":content">
						<f:setPropertyActionListener target="#{equipmentBean.equipment}" value="#{equipment}"/>
					</p:commandButton>
				</p:column>
				<p:column colspan="1" styleClass="ui-widget-header ui-table-button-row" >
					<p:commandButton title="#{msgs.Delete}" process="@this" onclick="wconfExcEquipment.show();"  icon="ui-icon-trash" styleClass="ui-table-button" >
						<f:setPropertyActionListener target="#{equipmentBean.equipment}" value="#{equipment}"/> 
					</p:commandButton>
				</p:column>		
			</p:dataTable>			
		</h:form>
	</ui:define>
	<ui:define name="tools">

	</ui:define>

	<ui:define name="dialogs">
		<ui:include src="/equipment/equipmentDialogs.xhtml"/>
	</ui:define>
</ui:composition>
	
</html>